package com.hfb.mashibing.alip8.spring.po;

import com.hfb.mashibing.alip8.spring.annotation.YamlPropertyLoaderFactory;
import java.util.List;
import java.util.Map;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

//@DependsOn({"propertySourcesPlaceholderConfigurer"})
// 后面会在配置类中使用@EnableConfigurationProperties注解，不需要将该属性类上添加@Component注解
@ConfigurationProperties(prefix = "person")
@PropertySource(value = "classpath:application.yml", encoding = "UTF-8", factory = YamlPropertyLoaderFactory.class)
@Component
public class PersonPO {

    private String name;
    private int age;
    private String sex;
    private Integer[] arrays;
    private List<Map<String, String>> lists;
    private Map<String, String> maps;
    private List<String> likes;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public Integer[] getArrays() {
        return arrays;
    }

    public void setArrays(Integer[] arrays) {
        this.arrays = arrays;
    }

    public List<Map<String, String>> getLists() {
        return lists;
    }

    public void setLists(List<Map<String, String>> lists) {
        this.lists = lists;
    }

    public Map<String, String> getMaps() {
        return maps;
    }

    public void setMaps(Map<String, String> maps) {
        this.maps = maps;
    }

    public List<String> getLikes() {
        return likes;
    }

    public void setLikes(List<String> likes) {
        this.likes = likes;
    }
}
